package top.huhuiyu.teachproject.controller;

import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.huhuiyu.teachproject.base.BaseResult;

@RestController
public class IndexController {

  @RequestMapping("")
  public BaseResult home(String name) {
    return BaseResult.ok(String.format("欢迎访问%s的后端服务网站", StringUtils.hasText(name) ? name : "黑暗骑士"));
  }
}
